//
//  NavigationModule.m
//  ZgcBank
//
//  Created by 球 on 2023/5/10.
//

#import "NavigationModule.h"
#import "HippyBundleURLProvider.h"
#import "HippyRootView.h"
#import "AppDelegate.h"
#import "SecondViewController.h"

@interface NavigationModule ()<HippyBridgeDelegate>

@end

@implementation NavigationModule

HIPPY_EXPORT_MODULE()

- (dispatch_queue_t)methodQueue
{
  return dispatch_get_main_queue();
}

HIPPY_EXPORT_METHOD(push:(nonnull NSString *)msg)
{
  AppDelegate *delegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
  UINavigationController *nav = (UINavigationController *)delegate.window.rootViewController;
  SecondViewController *vc = [[SecondViewController alloc] init];
  vc.msg = msg;
  [nav pushViewController:vc animated:YES];
}

@end
